let divObj;
$(function () {
    divObj = $("#blackDiv");

    $("#menuDiv .head").click(function () {
        divObj.slideUp("slower");
        $(this).next().slideDown("fast");
        divObj = $(this).next();
    })
});